package web;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class TestServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		 System.out.println("doGet");
		 String button = "<a class=\"layui-btn layui-btn-normal layui-btn-sm\" lay-event=\"detail\" onclick=\"serach()\">查询</a>";
		 req.setAttribute("button",button);
		 req.getRequestDispatcher("/pages/system/user/user/list.jsp").forward(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
	 System.out.println("doPost");
		super.doPost(req, resp);
	}

	@Override
	public void destroy() {
		System.out.println("destroy");
	}

	@Override
	public void init() throws ServletException {
		System.out.println("init");
		
	}
	
}
